{php include template("admin/header");}
<div class="midder">

{php include template("admin/menu");}

<div>
<form method="get" action="{SITE_URL}index.php">
<input type="hidden" name="app" value="user" />
<input type="hidden" name="ac" value="admin" />
<input type="hidden" name="mg" value="user" />
<input type="hidden" name="ts" value="list" />
UID：<input type="text" name="userid" /> 用户名：<input type="text" name="username" /> <input type="submit" value="搜索" />

<a class="btn" href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=clean">一键删除被停用用户</a>
    <a class="btn" href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=list&userid=0&duty=1">有服务记录的用户</a>&nbsp;&nbsp;<a>计数：{$userNum}</a>

</form>

</div>

<div class="page">{$pageUrl}</div>

<table  cellpadding="0" cellspacing="0">
<tr class="old"><td width="60">UID</td><td width="200">服务时长</td><td width="100">姓名</td><td>注册时间</td><td>登录IP</td><td>来自</td><td>操作</td></tr>
{loop $arrAllUser $key $item}
<tr class="odd"><td>{$item[userid]}</td><td>{$item[count_duty]}</td><td>{$item[username]}</td><td>{php echo date('Y-m-d H:i:s',$item[addtime])}</td>

<td>{$item['ip']}</td>
<td>{$item['comefrom']}</td>

<td>


    <a href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=isenable&&userid={$item[userid]}">

{if $item[isenable]=='0'}[停用]{else}<font color="red">[启用]</font>{/if}</a>

<a href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=pwd&userid={$item[userid]}">[重置密码]</a>


    {if  $item['userid']!=1}
<a href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=deldata&userid={$item[userid]}">[删除]</a>
 <a href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=admin&userid={$item['userid']}&token={$_SESSION['token']}">
 {if $item['isadmin']!=1}
 [设为管理员]
 {elseif $item['isadmin']==1}
  <font color="red">[取消管理员]</font>
 {/if}
 </a>
    <a href="{SITE_URL}index.php?app=user&ac=admin&mg=user&ts=assistant&userid={$item['userid']}&token={$_SESSION['token']}">
        {if $item['isadmin']!=2}
        [设为协理员]
        {elseif $item['isadmin']==2}
        <font color="red">[取消协理员]</font>
        {/if}
    </a>

    {/if}

</td>
</tr>
{/loop}
</table>

</div>
{php include template("admin/footer");}